package com.dinzeer.legendreliclib.configs;

import com.dinzeer.legendreliclib.Legendreliclib;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.config.ModConfigEvent;

// 配置管理类，用于处理模组配置
// 使用Forge的配置API管理模组设置
@Mod.EventBusSubscriber(modid = Legendreliclib.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class Config {
    // 配置构建器实例
    private static final ForgeConfigSpec.Builder BUILDER = new ForgeConfigSpec.Builder();
    
    public static final ForgeConfigSpec.BooleanValue StackHudOpen = BUILDER
            .comment("是否启用特别计数器hud", 
                     "Enable the special counter HUD")
            .define("StackHudOpen", true);

    public static final ForgeConfigSpec.ConfigValue<Integer> StackHudCount = BUILDER
            .comment("特别计数器hud显示的计数器数量", 
                     "Number of counters displayed in the special counter HUD")
            .define("StackHudCount", 10);
    
    public static final ForgeConfigSpec.BooleanValue CanDoubleAttack = BUILDER
            .comment("是否启用双持，启动后带有legendreliclib:can_double_attack标签的拔刀剑类物品可以进行双持", 
                     "Enable dual wielding. When enabled, items with the legendreliclib:can_double_attack tag that are slashblade type can be dual wielded")
            .define("can_double_attack", true);

    // 配置规范实例
   public static final ForgeConfigSpec SPEC = BUILDER.build();

    // 配置加载事件处理
    @SubscribeEvent
    static void onLoad(final ModConfigEvent event) {

    }
}